package com.showcai.redis;

import java.util.Collection;
import java.util.Set;

public interface Cache<K, V> {
	public V get(K key) throws Exception;
	public V put(K key, V value) throws Exception;
	public V put(K key, V value, int expire) throws Exception;
	public V remove(K key) throws Exception;
	public void clear() throws Exception ;
	public int size() throws Exception ;
	public Set<K> keys() throws Exception ;
	public Collection<V> values() throws Exception;
	public V sadd(K key, V value) throws Exception;
	public void srem(K key, V value) throws Exception;
	public int mapsize(K key) throws Exception;
	public void removeByKey(K key) throws Exception;
}
